import httpInstance from '@/utils/http'
export const loginAPI = ({ username, password }) => {
    return httpInstance.post('/user/login', { username, password })
}
export const registerAPI = ({ username, password, rePassword }) => {
    return httpInstance.post('/user/register', { username, password, rePassword })
}
export const changePasswordAPI = (passwordForm) => {
    return httpInstance.post('/user/changePassword', passwordForm)
}
export const modifyUserInfoAPI = (userInfo) => {
    return httpInstance.post('/user/modify', userInfo)
}
export const getUserInfoAPI = () => {
    return httpInstance.get('/user/info')
}
export const modifyUserStatusAPI = (userInfo) => {
    return httpInstance.post('/admin/status', userInfo)
}
export const getUserAPI = () => {
    return httpInstance.get('/admin/info')
}
export const getUserInfoByIdAPI = (id) => {
    return httpInstance.get('/admin?id=' + id)
}